package com.lmy.springCloud.service;

import com.lmy.springCloud.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Service
@FeignClient(value = "seata-account-micro-service-20091")
public interface AccountOpenFeignService {

    /**
     * 远程调用 seata-account-micro-service-20091 服务的 reduce方法
     * @param userId 用户id
     * @param money 金额
     * @return
     */
    @PostMapping("/account/reduce")
    public Result reduce(@RequestParam(value = "userId") Long userId, @RequestParam(value = "money") Integer money);
}
